package com.zkyc.framework.common.exception;

public enum ResultCode implements IResultCode {

    SUCCESS(200, "请求成功"),
    DOWNLOAD_SUCCESS(201, "下载成功"),
    FAILURE(500, "服务异常"),
    UNAUTHORIZED(401, "权限未认证"),
    PARAM_INVALID(501, "无效参数"),
    ReLogin(502,"需要重新登录"),
    SERVE_ERROR(503, "服务器内部错误"),
    PASSWORD_ERROR(506, "账号或密码错误"),
    SITE_DUPLICATION(504, "网站名称已存在，请修改"),
    DOMAIN_NAME_DUPLICATION(505, "域名已存在，请修改"),
    CENTER_DUPLICATION(507, "中心名称已存在，请修改"),
    ORGANIZATION_DUPLICATION(508, "组织已存在，请修改"),
    PI_ILLEGAL(509, "未在OA中找到PI信息，请确认工号是否正确"),
    PI_NULL(510, "PI为空"),
    TAG_DUPLICATION(511,"本组已存在标签，请修改"),
    TAGGROUP_DUPLICATION(512,"已存在标签组名称，请修改"),
    SUBJECT_DUPLICATION(513,"主题已存在，请修改"),
    URL_EXIST(514,"该域名已被使用"),
    UPLOAD_FAILED(515,"上传失败") ,
    DEPLOY_FAILED(516,"部署失败"),
    APPROVE_DUPLICATION(517,"已提交审核"),
    NO_APPROVE_RIGHT(518,"请联系管理员,添加相应的权限"),
    APPROVE1_EXIST(519,"该用户已被选中为一级审核员"),
    NO_APPROVE_INFORMATION(520,"未查询到审核信息"),
    PI_DUPLICATION(521,"该科研骨干已添加"),
    APPROVE2_EXIST(522,"该科研骨干已被选中为二级审核员"),
    PI_NOT_EXIST(523,"该科研骨干不属于当前中心");
    final Integer code;
    final String message;

    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }

    ResultCode(final Integer code, final String message) {
        this.code = code;
        this.message = message;
    }
}
